
myApp_.onPageInit('classify_goods_list',function(page){
	CLASSIFY_GOODS_LIST.request(CLASSIFY_GOODS_LIST.cate_id);
	CLASSIFY_GOODS_LIST.cate_id = '';
});

/**
 * 分类商品列表
 */
CLASSIFY_GOODS_LIST = {};
//分类id
CLASSIFY_GOODS_LIST.cate_id = '';
CLASSIFY_GOODS_LIST.data = {};

CLASSIFY_GOODS_LIST.__INIT__ = function(id){
	CLASSIFY_GOODS_LIST.cate_id = id;
	mainView.router.load({
		url: 'src/index/classify/classify_goods_list.html'
	});
}

CLASSIFY_GOODS_LIST.request = function(id){
	request_(
		url_('api/V1/cate_goods')
		,{
			cate_id: id,
			,community_id: Storage_.get('community_id')?Storage_.get('community_id'):''
		}
		,function(d){
			if (d.code == 0) {
		        CLASSIFY_GOODS_LIST.data = d.data;
				CLASSIFY_GOODS_LIST.fill_list();
		    } else {
		        my_tips_(d.msg);
		    }
		}
	);
}

CLASSIFY_GOODS_LIST.fill_list = function(){
	
}

CLASSIFY_GOODS_LIST.list_tpl = '';